package com.example.pingze.repository;

import com.example.pingze.entity.MyInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface MyInfoRepository extends JpaRepository<MyInfo,String>, JpaSpecificationExecutor<MyInfo> {

    MyInfo findMyInfoByAccount(String account);

//    @Query( "select " +
//            "new com.example.pingze.dto.MyInfoAndUserLoginDto(" +
//            "u.id,m.account,u.password," +
//            "m.avatar,m.nickname,m.sexy,m.myTag,m.mySign)" +
//            "from MyInfo m " +
//            "join UserLogin u " +
//            "on m.account=u.account " +
//            "where m.account= :account")
//    MyInfoAndUserLoginDto findByAccount(String account);
}
